<template>
  <div class="download_mod">
    <v-loading v-if="loading" />
    <v-nav :title="$t('Download.download software')"></v-nav>
    <div class="download_mod_box">
      <div class="swiper">
        <img src="@/assets/img/3200.png" width="100%" />
      </div>
      <div class="download-equipment">
        <div class="ios">
          <div class="left">
            <img
              src=""
              width="90%"
            />
          </div>
          <div class="center">
            <h1>IOS</h1>
            <p>{{ $t('Download.Age 5+') }}</p>
            <p>{{ $t('Download.Provide safe and convenient trading mode') }}</p>
          </div>
          <div class="right">
            <a :href="iosDownload">
              <van-button color="#EE3E57">{{ $t('Download.download') }}</van-button>
            </a>
          </div>
        </div>
        <div class="android">
          <div class="left">
            <img
              src=""
              width="90%"
            />
          </div>
          <div class="center">
            <h1>Android</h1>
            <p>{{ $t('Download.Age 5+') }}</p>
            <p>{{ $t('Download.Provide safe and convenient trading mode') }}</p>
          </div>
          <div class="right">
            <a :href="androidDownload">
              <van-button color="#EE3E57">{{ $t('Download.download') }}</van-button>
            </a>
          </div>
        </div>
        <div class="desc">
          <h1>{{ $t('Download.introduce') }}</h1>
          <p>{{ $t('Download.describe') }}</p>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'download',
  data() {
    return {
      loading: false,
      iosDownload: '#',
      androidDownload: '#'
    }
  },
  created() {
    this.getDownload()
  },
  methods: {
    async getDownload() {
      this.loading = true
      await this.$https.post('/Platform/getAppDownload').then(res => {
        if (res != undefined && res.code == 1) {
          this.iosDownload = res.data.ios_download
          this.androidDownload = res.data.android_download
        }
      })
      this.loading = false
    }
  }
}
</script>

<style lang="less" scoped>
@import url('./index.less');
</style>
